# SDK add new function
# read weights 
# cnn
# 

def cim_linear(obj,input,config):
    rc = config['rocc_config']
    ma = config['mvm_addr']
    print(rc,ma)
    #obj.selectChip(config['arrayindex'])
    obj.rocc_config(rc[0],rc[1],rc[2],rc[3])
    obj.rocc_push(input,ma[0],ma[2])
    obj.rocc_mvm(config['arrayindex'],ma[0],ma[2],ma[1],ma[3])
    cim_out = obj.rocc_save(ma[1],ma[3])
    return cim_out
